﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="work.aspx.cs" Inherits="token_work" %>
<%@ Register Assembly="pager" Namespace="wbh" TagPrefix="uc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>办公自动化栏目管理系统-拓垦团队</title>
    <link href="../style/global.css" rel="stylesheet" type="text/css" />
    <link href="../style/base.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript">
    <!--
    function $(id) { return document.getElementById(id); }
    
    function onchangeImgHomeType(sender) {
        $("dFileUploadImgHome0").style.display = "none";
        $("dFileUploadImgHome1").style.display = "none";
        $("dFileUploadImgHome" + $(sender).value).style.display="";
    }
    //-->
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="mainFrame" style="width:713px;">
        <div class = "titleBar">您现在的位置：办公自动化 | 拓垦团队作品管理>> <asp:Label ID="litOP" runat="server" Text="添加作品"></asp:Label></div>
 
        <div id = "mainContent">
            <div class="aLine">
                <asp:Label ID="lbTips" runat="server" Visible="false" ForeColor="red"></asp:Label>
            </div>
            <div class="aLine">
                <ul>
                    <li class="fillLeft">作品名称</li>
                    <li>
                        <input type="text" id="tbName" class="inputBox" runat="server" style="width: 250px"
                            maxlength="100" />
                        <span class="notMsg">*</span>
                        <asp:RequiredFieldValidator ID="RFV_Name" runat="server" ErrorMessage="作品名称不能为空"
                            ControlToValidate="tbName" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </li>
                </ul>
                <div class="clear">
                </div>
                <ul>
                    <li class="fillLeft">作品图片</li>
                    <li>
                        <select id="selImgHome" runat="Server" onchange="onchangeImgHomeType(this.id);">
                            <option value="0">上传图片</option>
                            <option value="1" selected="selected">图片URL</option>
                        </select>
                    </li>
                    <li>
                        <div id="dFileUploadImgHome0" style="display: none; float: left;">
                            <asp:FileUpload ID="fuImgHome" runat="server" CssClass="inputBox" Style="height: 20px" />
                            <span class="comMsg">图片最佳尺寸 <span class="notMsg">150×150</span></span>
                        </div>
                        <div id="dFileUploadImgHome1" style="float: left;">
                            <input type="text" id="tbImgHome" size="40" class="inputBox" runat="server" />
                            <span class="comMsg"> 如： ~/Uploads/*.jpg</span>
                        </div>
                        <asp:Literal ID="ImgPreview" runat="server" Visible="false" />
                    </li>
                </ul>
                <div class="clear">
                </div>
                <ul>
                    <li class="fillLeft">作品类型</li>
                    <li>
                        <input type="text" id="tbType" class="inputBox" runat="server" style="width: 250px"
                            maxlength="20" />
                        <span class="notMsg">*</span>
                        <asp:RequiredFieldValidator ID="RFV_Type" runat="server" ErrorMessage="作品类型不能为空"
                            ControlToValidate="tbType" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </li>
                </ul>
                
                <div class="clear">
                </div>
                <ul>
                    <li class="fillLeft">使用工具</li>
                    <li>
                        <input type="text" id="tbTool" class="inputBox" runat="server" style="width: 250px"
                            maxlength="20" />
                        <span class="notMsg">*</span>
                        <asp:RequiredFieldValidator ID="RFV_Tool" runat="server" ErrorMessage="使用工具不能为空"
                            ControlToValidate="tbTool" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </li>
                </ul>
                
                <div class="clear">
                </div>
                <ul>
                    <li class="fillLeft">作品地址</li>
                    <li>
                        <input type="text" id="tbUrl" class="inputBox" runat="server" style="width: 250px"
                            maxlength="20" />
                        <span class="notMsg">*</span>
    
                        <asp:RequiredFieldValidator ID="RFV_Url" runat="server" ErrorMessage="作品地址不能为空"
                            ControlToValidate="tbUrl" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    </li>
                </ul>
                
                <div class="clear">
                </div>
                <ul>
                    <li class="fillLeft"></li>
                    <li>
                        <asp:HiddenField ID="hfWorkId" runat="server" />
                        <asp:Button ID="btSubmit" OnClick="Submit_Click" Text="提交" runat="server" /> 
                        <asp:Button ID="btnCancel" Text="返回" runat="server" onclick="btnCancel_Click"/></li>
                </ul>
                <div class="clear">
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
